package xadrez;

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class Tela extends JPanel implements MouseListener{

	private int x;
	private int y;
	private boolean click;
	private int estado;
	private Point point;
	
	public Tela() {
		super();
		click = false;
		estado = 0;
		this.addMouseListener(this);                
	}
	
	public int getEstado() {
		return estado;
	}
	
	public void setEstado(int estado) {
		this.estado = estado;
	}
	
	public boolean click() {
		return click;
	}
	
	public Point getPoint() {
		click =  false;
		return point;
	}
	
        
    public void mousePressed(MouseEvent e) {  
        point = e.getPoint();				
	click = true;
        //System.out.println("coordenadas escolhidas " + (int)point.getX() + " " + (int)point.getY());
    }

    public void mouseReleased(MouseEvent e) {  }

    public void mouseEntered(MouseEvent e) {  }

    public void mouseExited(MouseEvent e) {  }

    public void mouseClicked(MouseEvent e) {
        
			
    }
	
	
}
